Feat/update pydantic - Support for Pydantic V2#9
Closed
leonballoni wants to merge 4 commits intoInfisical:mainfrom
Closed
Feat/update pydantic - Support for Pydantic V2#9leonballoni wants to merge 4 commits intoInfisical:mainfrom
leonballoni wants to merge 4 commits intoInfisical:mainfrom
Conversation
Feat/update pydantic - Support for Pydantic V2
Author
|
@maidul98 , @akhilmhdh , @sheensantoscapadngan Please, review. |
I want to start using infisical but not having pydantic 2 support is a huge blocker, most libraries are already on pydantic 2. |
Author
While waiting @ion-elgreco , you can use it in the forked repository: https://github.com/leonballoni/infisical-python-client/tree/main |
Member
|
Hi @leonballoni, I've reached out via. Slack to get some more details |
Author
Hi, replied you there. |
Member
|
Resolved in #12 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
Using package bump-pydantic, I refactored the package Pydantic version 1.* to version 2.* and adapted some other dependencies such as python version and else.
Detailed description
The commit below represents what has changed in the code.
updates the project's package dependencies and requirements, specifically removing support for Python 3.7. It modifies various CI configurations (GitHub Actions, GitLab CI, and Travis CI) to remove Python 3.7 from the testing matrix. It adjusts the README to reflect the new minimum Python version requirement of 3.8. Additionally, a new
poetry.lockfile is introduced to ensure consistent dependency management with newer versions of required packages. The changes ensure that the project is aligned with more current and supported Python versions and dependencies.refactors the usage of Pydantic models in the API by upgrading to Pydantic v2 with the help of the
bump-pydanticlibrary. The changes primarily involve replacing theconstrandcon*types withAnnotatedtypes combined withStringConstraintsto achieve similar validation constraints. This update enhances code compatibility with Pydantic v2 and aligns with the annotated type hinting approach recommended by the new versionupdates the version constraint for the
pydanticpackage across several configuration files. Specifically, it replaces the version constraint^2.10.1with>2.1inpyproject.tomland adjusts the corresponding minimum version in other dependency management files to>= 2.1down from>= 2.10.1. This broadens the range of acceptable versions of thepydanticpackage, likely to accommodate compatibility with a wider set of versions. Additionally, the commit includes updates to the content hash in thepoetry.lockfile to reflect these changes in dependencies.